/* =============================================
   SMART OASIS 2.0 — Dashboard Enhancements CSS
   ============================================= */

/* ── SIDEBAR IMPROVEMENTS ── */
.sidebar {
    background: linear-gradient(180deg, #0a1628 0%, #0d1f3c 50%, #0a1628 100%) !important;
    border-left: 1px solid rgba(0, 229, 200, 0.15) !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4) !important;
}

.sidebar-brand {
    background: linear-gradient(135deg, rgba(0, 229, 200, 0.1), rgba(59, 130, 246, 0.05)) !important;
    border-bottom: 1px solid rgba(0, 229, 200, 0.15) !important;
    padding: 1.25rem 1.5rem !important;
}

.sidebar-title {
    background: linear-gradient(135deg, #00e5c8, #3b82f6) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    font-weight: 800 !important;
    font-size: 1.1rem !important;
}

.sidebar-item {
    margin: 2px 8px !important;
    border-radius: 10px !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

.sidebar-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 229, 200, 0.08), rgba(59, 130, 246, 0.04));
    opacity: 0;
    transition: opacity 0.25s ease;
    border-radius: 10px;
}

.sidebar-item:hover::before { opacity: 1; }

.sidebar-item:hover {
    transform: translateX(-3px) !important;
    color: #00e5c8 !important;
    background: rgba(0, 229, 200, 0.08) !important;
}

.sidebar-item.active {
    background: linear-gradient(135deg, rgba(0, 229, 200, 0.18), rgba(59, 130, 246, 0.1)) !important;
    border-right: 3px solid #00e5c8 !important;
    color: #00e5c8 !important;
    box-shadow: 0 4px 20px rgba(0, 229, 200, 0.15), inset 0 1px 0 rgba(255,255,255,0.05) !important;
}

.sidebar-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.5) !important;
    animation: badge-pulse 2s ease infinite !important;
}

@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 0 8px rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 16px rgba(239, 68, 68, 0.8); }
}

/* Website link in sidebar footer */
.sidebar-website-link {
    background: linear-gradient(135deg, rgba(0, 229, 200, 0.08), rgba(59, 130, 246, 0.05)) !important;
    border: 1px solid rgba(0, 229, 200, 0.2) !important;
    border-radius: 8px !important;
    margin-bottom: 6px !important;
    font-size: 0.72rem !important;
    color: #00e5c8 !important;
    opacity: 0.85 !important;
}

.sidebar-website-link:hover {
    opacity: 1 !important;
    background: rgba(0, 229, 200, 0.12) !important;
    transform: translateX(-2px) !important;
}

/* ── TOPBAR IMPROVEMENTS ── */
.topbar {
    background: rgba(10, 22, 40, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(0, 229, 200, 0.12) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3) !important;
}

.topbar-time {
    font-family: 'JetBrains Mono', monospace !important;
    color: #00e5c8 !important;
    font-size: 0.82rem !important;
    background: rgba(0, 229, 200, 0.06) !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    border: 1px solid rgba(0, 229, 200, 0.15) !important;
}

.topbar-notification {
    transition: all 0.25s ease !important;
}

.topbar-notification:hover {
    color: #00e5c8 !important;
    background: rgba(0, 229, 200, 0.08) !important;
    transform: scale(1.08) !important;
}

.notif-count {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5) !important;
}

.user-avatar {
    background: linear-gradient(135deg, #00e5c8, #3b82f6) !important;
    box-shadow: 0 0 16px rgba(0, 229, 200, 0.3) !important;
    font-weight: 700 !important;
    transition: all 0.25s ease !important;
    cursor: pointer !important;
}

.user-avatar:hover {
    transform: scale(1.08) !important;
    box-shadow: 0 0 24px rgba(0, 229, 200, 0.5) !important;
}

/* ── GLASS CARDS IMPROVEMENTS ── */
.glass-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.02) 100%) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

.glass-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 229, 200, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glass-card:hover::after { opacity: 1; }

.glass-card:hover {
    transform: translateY(-2px) !important;
    border-color: rgba(0, 229, 200, 0.2) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 229, 200, 0.08) !important;
}

/* ── PANEL HEADER ── */
.panel-header h2 {
    background: linear-gradient(135deg, #ffffff, #00e5c8) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* ── STAT CARDS ── */
.stat-big-number {
    background: linear-gradient(135deg, #00e5c8, #3b82f6) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.quick-stat-value {
    background: linear-gradient(135deg, #00e5c8, #7dd3fc) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* ── STATUS BADGES ── */
.badge-healthy {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1)) !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
    color: #10b981 !important;
}

.badge-teal {
    background: linear-gradient(135deg, rgba(0, 229, 200, 0.15), rgba(0, 229, 200, 0.05)) !important;
    border: 1px solid rgba(0, 229, 200, 0.35) !important;
    color: #00e5c8 !important;
}

.badge-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.08)) !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
    color: #f59e0b !important;
}

.badge-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.08)) !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
    color: #ef4444 !important;
}

/* ── ALERT BADGES ── */
.alert-badge {
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
}

.alert-badge:hover { transform: scale(1.04) !important; }

.alert-badge.critical {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.08)) !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
    color: #ef4444 !important;
}

.alert-badge.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.08)) !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    color: #f59e0b !important;
}

.alert-badge.info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.08)) !important;
    border: 1px solid rgba(59, 130, 246, 0.35) !important;
    color: #60a5fa !important;
}

/* ── GAUGE IMPROVEMENTS ── */
.gauge-fill {
    filter: drop-shadow(0 0 6px rgba(0, 229, 200, 0.5)) !important;
}

/* ── DATA TABLE ── */
.data-table thead tr {
    background: linear-gradient(135deg, rgba(0, 229, 200, 0.08), rgba(59, 130, 246, 0.05)) !important;
    border-bottom: 1px solid rgba(0, 229, 200, 0.2) !important;
}

.data-table tbody tr {
    transition: background 0.2s ease !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
}

.data-table tbody tr:hover {
    background: rgba(0, 229, 200, 0.04) !important;
}

/* ── ACTIVITY FEED ── */
.activity-item {
    border-right: 2px solid rgba(0, 229, 200, 0.15) !important;
    transition: all 0.2s ease !important;
}

.activity-item:hover {
    border-right-color: rgba(0, 229, 200, 0.5) !important;
    background: rgba(0, 229, 200, 0.03) !important;
    padding-right: 14px !important;
}

/* ── ANOMALY LIST ── */
.anomaly-item {
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
}

.anomaly-item.critical {
    border-left: 3px solid #ef4444 !important;
    background: rgba(239, 68, 68, 0.05) !important;
}

.anomaly-item.warning {
    border-left: 3px solid #f59e0b !important;
    background: rgba(245, 158, 11, 0.05) !important;
}

.anomaly-item.info {
    border-left: 3px solid #60a5fa !important;
    background: rgba(59, 130, 246, 0.05) !important;
}

/* ── PIPELINE VISUAL ── */
.pipe-icon {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.pipe-icon:hover {
    transform: scale(1.1) translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

.pipe-icon.core-icon {
    background: linear-gradient(135deg, #00e5c8, #3b82f6) !important;
    box-shadow: 0 0 20px rgba(0, 229, 200, 0.3) !important;
}

/* ── SCROLL PROGRESS (DASHBOARD) ── */
#scroll-progress-bar { display: none !important; }

/* ── PANEL TRANSITION ── */
.panel {
    animation: panelFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes panelFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── CONTROL SELECT ── */
.control-select {
    background: rgba(10, 22, 40, 0.8) !important;
    border: 1px solid rgba(0, 229, 200, 0.2) !important;
    color: #e2e8f0 !important;
    border-radius: 8px !important;
    transition: border-color 0.2s ease !important;
}

.control-select:focus {
    border-color: rgba(0, 229, 200, 0.5) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 229, 200, 0.1) !important;
}

/* ── THROUGHPUT VALUE ── */
.throughput-value {
    background: linear-gradient(135deg, #00e5c8, #3b82f6) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* ── FARM SELECTOR ── */
#farmSelector {
    background: rgba(10, 22, 40, 0.9) !important;
    border: 1px solid rgba(0, 229, 200, 0.2) !important;
    color: #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 4px 10px !important;
}

/* ── STATUS DOT PULSE ── */
.status-dot.pulse {
    animation: statusPulse 1.8s ease infinite !important;
}

@keyframes statusPulse {
    0%, 100% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
    50%       { box-shadow: 0 0 0 6px transparent; opacity: 0.7; }
}

/* ── SCROLLBAR ── */
.main-content::-webkit-scrollbar,
.activity-feed::-webkit-scrollbar,
.anomaly-list::-webkit-scrollbar {
    width: 5px;
}

.main-content::-webkit-scrollbar-track,
.activity-feed::-webkit-scrollbar-track,
.anomaly-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.main-content::-webkit-scrollbar-thumb,
.activity-feed::-webkit-scrollbar-thumb,
.anomaly-list::-webkit-scrollbar-thumb {
    background: rgba(0, 229, 200, 0.25);
    border-radius: 4px;
}

.main-content::-webkit-scrollbar-thumb:hover,
.activity-feed::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 229, 200, 0.45);
}

/* ── CHART CARDS ── */
.chart-header h3 {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .sidebar-website-link { display: none !important; }
}
